package teacher.action;

import teacher.bean.Award;
import teacher.service.award;
import teacher.service.flow;

import com.opensymphony.xwork2.ActionSupport;

public class deleteAwa extends ActionSupport {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private int awardid;
	String suc;

	public String getSuc() {
		return suc;
	}

	public void setSuc(String suc) {
		this.suc = suc;
	}

	public int getAwardid() {
		return awardid;
	}

	public void setAwardid(int awardid) {
		this.awardid = awardid;
	}

	public String execute() throws Exception {
		
		Award awa=new Award();
		awa.setAwaId(awardid);
		if(new flow().DeleteFlow(awardid, 3))//删除流程
		{System.out.println("删除流程成功！！！");}
		if(new award().DeleteAwa(awa))
		{
			this.setSuc("success");
		return SUCCESS;}
		else{
			return ERROR;
		}
	}


	
}
